#ifndef CSTICKYNOTESUIMGR_H
#define CSTICKYNOTESUIMGR_H

#include <QSystemTrayIcon>
#include <QDialog>

QT_BEGIN_NAMESPACE
class QMenu;
class QAction;
class QIcon;
QT_END_NAMESPACE

class CStickyNotesUIMgr : public QDialog
{
    Q_OBJECT
public:
    /** Registers the "actions" or signals and slots associated with different UI components */
    void RegisterActions();

    /** Constructor of the class */
    CStickyNotesUIMgr();

    /** Overriden function that enables / disables menu items from the systray context menu */
    void setVisible(bool visible);

private slots:
    /** Called when the user clicks on the systray icon */
    void IconActivated(QSystemTrayIcon::ActivationReason aReason);

    /** Called when the 'Minimize' item from the systray context menu is selected */
    void MinimizeTriggered();

    /** Called when the 'Maximize' item from the systray context menu is selected */
    void MaximizeTriggered();

    /** Called when the 'Donate' item from the systray context menu is selected */
    void DonateTriggered();

    /** Called when the 'Donate' item from the systray context menu is selected */
    void AddDayNoteTriggered();

    /** Called when the 'Donate' item from the systray context menu is selected */
    void AddDateNoteTriggered();

    /** Called when the 'Donate' item from the systray context menu is selected */
    void AddGenericTriggered();


private:
    /** Displays a pop up containing the login information of the user */
    void DisplayLoginInfo();

private:
    /** Instance of the framework class needed to show a "system tray" icon */
    QSystemTrayIcon* iSystemTrayIcon;

    /** Instance of the actual ICON object */
    QIcon* iTrayIcon;

    /** The context menu associated with the system tray */
    QMenu* iSystemTrayMenu;
    QMenu* iAddNoteMenu;

    /** "Action" items associated with every item of the context menu */
    QAction* iDonateAction;
    QAction* iMaximizeAction;
    QAction* iMinimizeAction;
    QAction* iQuitAction;

    /** Actions associated with the submenu 'Add Note' */
    QAction* iAddDateNoteAction;
    QAction* iAddDayNoteAction;
    QAction* iAddGenericNoteAction;
};

#endif // CSTICKYNOTESUIMGR_H
